use std::collections::HashMap;
use crate::IResult;

pub fn get(url: &str) -> IResult<String>{
    let res = reqwest::blocking::get(url)?.text()?;
    Ok(res.to_owned())
}

pub fn post(url: &str, body_str: &str) -> IResult<String>{
    let client = reqwest::blocking::Client::new();
    let mut res = client.post(url).body(body_str.to_string()).send()?.text()?;
    Ok(res)
}